
<div class="form">

<?php $ajax = ($this->enable_ajax_validation) ? 'true' : 'false'; ?>

<?php echo '<?php '; ?>
$form = $this->beginWidget('GxActiveForm', array(
	'id' => '<?php echo $this->class2id($this->modelClass); ?>-form',
	'enableAjaxValidation' => <?php echo $ajax; ?>,
    'htmlOptions'=>array(
        'class'=>'form-horizontal',
    ),
));
<?php echo '?>'; ?>

<?php echo "<?php echo \$form->errorSummary(\$model,'<button type=\"button\" class=\"close\" data-dismiss=\"alert\"><i class=\"icon-remove\"></i></button>',null,array('class'=>'alert alert-danger')); ?>\n"; ?>

<hr />




    <!--<div class="form-group">
        <label for="form-field-1" class="col-sm-3 control-label no-padding-right"> Text Field </label>

        <div class="col-sm-9">
            <input type="text" class="col-xs-10 col-sm-5" placeholder="Username" id="form-field-1">
        </div>
    </div>-->

    <div class="row">
        <div class="col-xs-12">

    <?php foreach ($this->tableSchema->columns as $column): ?>
    <?php if (!$column->autoIncrement): ?>

            <div class="form-group">
            <?php echo "<?php echo " . $this->generateActiveLabel($this->modelClass, $column) . "; ?>\n"; ?>
            <div class="col-xs-12 col-sm-5">
                <?php echo "<?php " . $this->generateActiveField($this->modelClass, $column) . "; ?>\n"; ?>
            </div>
            <?php echo "<?php echo \$form->error(\$model,'{$column->name}',array('class'=>'help-block col-xs-12 col-sm-reset inline error')); ?>\n"; ?>
            </div><!-- row -->
    <?php endif; ?>
    <?php endforeach; ?>

    <?php foreach ($this->getRelations($this->modelClass) as $relation): ?>
    <?php if ($relation[1] == GxActiveRecord::HAS_MANY || $relation[1] == GxActiveRecord::MANY_MANY): ?>
            <label><?php echo '<?php'; ?> echo GxHtml::encode($model->getRelationLabel('<?php echo $relation[0]; ?>')); ?></label>
            <?php echo '<?php ' . $this->generateActiveRelationField($this->modelClass, $relation) . "; ?>\n"; ?>
    <?php endif; ?>
    <?php endforeach; ?>





                <div class="form-actions">

                    <?php echo "<?php\n"; ?>

                    $this->widget('bootstrap.widgets.TbButton', array(
                    'buttonType'=>'submit',
                    'type'=>'primary',
                    'icon'=>'ok white',
                    'label'=>$model->isNewRecord ? 'Create' : 'Save',
                    )

                    );

                    ?>
                    <?php echo "<?php\n"; ?> $this->widget('bootstrap.widgets.TbButton', array(
                    'buttonType'=>'reset',
                    'icon'=>'remove',
                    'label'=>'Reset',
                    )); ?>
                </div>


            <?php echo "<?php\n"; ?> $this->endWidget(); ?>



        </div>
    </div>

</div><!-- form -->